package router

import (
	"github.com/gin-gonic/gin"
	"github.com/smash-llj/Nexa-server/api"
)

func InitSessionRoutes() {
	RegisterRoute(func(rgPublic *gin.RouterGroup, tgAuth *gin.RouterGroup) {
		sessionApi := api.NewSessionApi()
		privateRoutes(tgAuth, sessionApi)
	})
}

func privateRoutes(tgAuth *gin.RouterGroup, api *api.SessionApi) {
	tgAuth.POST("/createSession", api.CreateSession)
	tgAuth.GET("/getSessionList", api.RecentChatSession)
	tgAuth.GET("/pinnedSession/:sessionId", api.PinnedSession)
	tgAuth.GET("/updateUnread", api.UpdateSessionUnread)
}
